//
//  SCRecommendGoods_EPCell.m
//  shangcheng
//
//  Created by 张艳江 on 2019/7/5.
//  Copyright © 2019 张艳江. All rights reserved.
//

#import "SCRecommendGoods_EPCell.h"

@implementation SCRecommendGoods_EPCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setModel:(SCModel *)model{
    _model = model;
    [self.goodsImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://www.douyinhot.com/upload/foodshop_goods/%@",model.image]] placeholderImage:[UIImage imageNamed:@""]];
    self.nameLab.text = model.name;
    self.desLab.text = model.des;
    self.priceLab.text = [NSString stringWithFormat:@"¥ %@",[MyTool removeFloatAllZeroByString:model.price]];
    self.oldPriceLab.text = [NSString stringWithFormat:@"¥%@",[MyTool removeFloatAllZeroByString:model.old_price]];
}
- (IBAction)clickBuyBtn:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(clickBuyButtonWithModel:)]) {
        [self.delegate clickBuyButtonWithModel:self.model];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
